package itheima.com.HashSetTest;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class HashMapDemo03 {
    public static void main(String[] args) {
        Map<String,String> map = new HashMap<>();
        //存储键值对象
        map.put("一号丈夫","一号妻子");
        map.put("二号丈夫","二号妻子");
        map.put("三号丈夫","三号妻子");
        map.put("四号丈夫","四号妻子");
        map.put("五号丈夫","五号妻子");

        //提取对象键
        Set<String> keySet = map.keySet();
        for (String key : keySet) {
            String value = map.get(key);
            System.out.println(value);
        }
    }
}
